package com.hailian.fintech.hlrenting_houseserver.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.hailian.fintech.hlrenting_houseserver.entity.Lease;
import com.hailian.fintech.hlrenting_houseserver.entity.LeaseVo;
import com.hailian.fintech.hlrenting_houseserver.mapper.LeaseMapper;
import com.hailian.fintech.hlrenting_houseserver.service.ILeaseService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author wyt
 * @since 2020-05-21
 */
@Service
@Slf4j
public class LeaseServiceImpl extends ServiceImpl<LeaseMapper, Lease> implements ILeaseService {

    @Autowired
    private LeaseMapper leaseMapper;

    /***
     * 根据外键值  查询租约信息
     * @param tenantId
     * @return
     */
    @Override
    public List<LeaseVo> leaseList(Integer tenantId) {
        log.info("外键租客的id值:{}",tenantId);
        return leaseMapper.leaseList(tenantId);
    }
}
